import React, { memo, useEffect } from "react";
import { useDispatch } from "react-redux";

import "./index.scss";
import radioActions from "store/action/djradio";

import WYRadioCategory from "./radio-category";
import WYRadioRank from "./radio-ranking";
import WYRadioRecommend from "./radio-recommend";

export default memo(function WYDjradio() {
  const dispatch = useDispatch();
  useEffect(() => {
    dispatch(radioActions.getRadCateList());
  }, [dispatch]);

  return (
    <div className="wy-djradio wrap-v2">
      <WYRadioCategory />
      <WYRadioRecommend />
      <WYRadioRank />
    </div>
  );
});
